package com.licheng.controller;

import com.licheng.pojo.ChangePass;
import com.licheng.pojo.Result;
import com.licheng.service.EmpService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class ChangePassController {
    @Autowired
    private EmpService empService;

    @PutMapping("/changePassword")
    public Result changePass(@RequestBody ChangePass changePass) {
        log.info("传来的密码：{}", changePass);
        Result result = empService.changePass(changePass);
        return result;
    }
}
